﻿String.prototype.format = String.prototype.f = function () {
    var s = this,
        i = arguments.length;

    while (i--) {
        s = s.replace(new RegExp('\\{' + i + '\\}', 'gm'), arguments[i]);
    }
    return s;
};

Date.prototype.clone = function() {
    var copy = new Date();
    copy.setTime(this.getTime());
    return copy;
};
